package xxhui.space.newsclient.util;

import android.app.Application;

import okhttp3.OkHttpClient;
import xxhui.space.newsclient.Bean.User;
import xxhui.space.newsclient.Http.MyCookiesJar;

/**
 * Created by hui on 2016/5/31.
 */
public class MyApplication extends Application {

    public static final String TAG = "MyApplication";

    public static OkHttpClient okHttpClient;

    private static boolean isLogin ;

    private static User user;


    @Override
    public void onCreate() {
        super.onCreate();
        okHttpClient = new OkHttpClient.Builder().cookieJar(new MyCookiesJar()).build();
    }

    public static OkHttpClient getOkHttpClient() {
        return okHttpClient;
    }

    public static void setOkHttpClient(OkHttpClient okHttpClient) {
        MyApplication.okHttpClient = okHttpClient;
    }

    public static boolean isLogin() {
        return isLogin;
    }

    public static void setIsLogin(boolean isLogin) {
        MyApplication.isLogin = isLogin;
    }

    public static User getUser() {
        return user;
    }

    public static void setUser(User user) {
        MyApplication.user = user;
    }
}
